package com.app.newiptv.activity;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;

import org.junit.runner.RunWith;

import okhttp3.Call;


@RunWith(AndroidJUnit4.class)
public class LoginActivityTest {

    public static void test() {
                OkHttpUtils.post()
                        .url("http://51.178.178.227/api.php/tvapi/login")
                        .addParams("u_name", "1111")
                        .addParams("u_password", "11")
                        .build().execute(new StringCallback() {
                    @Override
                    public void onError(Call call, Exception e, int id) {
                        Log.i("onError", "onError: " + e);

                    }

                    @Override
                    public void onResponse(String response, int id) {
                        Log.i("onResponse", "onResponse: " + response);
                    }
                });
    }

}